package com.ruoyi.attendance.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 考勤政策/排班详情对象 attendance_policies
 * 
 * @author ruoyi
 * @date 2025-05-30
 */
public class AttendancePolicies extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 考勤政策ID，主键 */
    private Long id;

    /** 政策名称（如：标准朝九晚六） */
    @Excel(name = "政策名称", readConverterExp = "如=：标准朝九晚六")
    private String policyName;

    /** json格式的上下班时间段,但是存的是字符串, 应该手动解析数据 */
    @Excel(name = "json格式的上下班时间段,但是存的是字符串, 应该手动解析数据")
    private String workTimeJson;

    /** 打卡成功的容忍时间范围, 即在规定上班时间后N分钟内可以成功打卡,  在下班时间的前N分钟内不会被认为早退 */
    @Excel(name = "打卡成功的容忍时间范围, 即在规定上班时间后N分钟内可以成功打卡,  在下班时间的前N分钟内不会被认为早退")
    private Long tolerateTimes;

    /** 加班起始时间（下班时间后N分钟开始算加班） */
    @Excel(name = "加班起始时间", readConverterExp = "下=班时间后N分钟开始算加班")
    private Long overtimeStart;

    /** 每日标准工作时长（小时） */
    @Excel(name = "每日标准工作时长", readConverterExp = "小=时")
    private BigDecimal workHoursPerDay;

    /** 政策描述 */
    @Excel(name = "政策描述")
    private String description;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdAt;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updatedAt;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setPolicyName(String policyName) 
    {
        this.policyName = policyName;
    }

    public String getPolicyName() 
    {
        return policyName;
    }

    public void setWorkTimeJson(String workTimeJson) 
    {
        this.workTimeJson = workTimeJson;
    }

    public String getWorkTimeJson() 
    {
        return workTimeJson;
    }

    public void setTolerateTimes(Long tolerateTimes) 
    {
        this.tolerateTimes = tolerateTimes;
    }

    public Long getTolerateTimes()
    {
        return tolerateTimes;
    }

    public void setOvertimeStart(Long overtimeStart) 
    {
        this.overtimeStart = overtimeStart;
    }

    public Long getOvertimeStart() 
    {
        return overtimeStart;
    }

    public void setWorkHoursPerDay(BigDecimal workHoursPerDay) 
    {
        this.workHoursPerDay = workHoursPerDay;
    }

    public BigDecimal getWorkHoursPerDay() 
    {
        return workHoursPerDay;
    }

    public void setDescription(String description) 
    {
        this.description = description;
    }

    public String getDescription() 
    {
        return description;
    }

    public void setCreatedAt(Date createdAt) 
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt() 
    {
        return createdAt;
    }

    public void setUpdatedAt(Date updatedAt) 
    {
        this.updatedAt = updatedAt;
    }

    public Date getUpdatedAt() 
    {
        return updatedAt;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("policyName", getPolicyName())
            .append("workTimeJson", getWorkTimeJson())
            .append("tolerateTimes", getTolerateTimes())
            .append("overtimeStart", getOvertimeStart())
            .append("workHoursPerDay", getWorkHoursPerDay())
            .append("description", getDescription())
            .append("createdAt", getCreatedAt())
            .append("updatedAt", getUpdatedAt())
            .toString();
    }
}
